<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>智慧苏尼特·脱贫攻坚信息管理系统</title>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>智慧苏尼特·脱贫攻坚信息管理系统</title>
        <style type="text/css">
            /*CSS reset*/
            html{color:#000;background:#FFF;font-family:Microsoft YaHei,sans-serif,Arial,'宋体';}
            body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td,strong{padding:0;margin:0;font-family:Microsoft YaHei,sans-serif,Arial;}
            table{border-collapse:collapse;border-spacing:0;}
            fieldset,img{border:0;}
            a{text-decoration:none; color:#; outline:none;}/*此处待添加默认链接颜色*/
            var,em,strong{font-style:normal;}
            address,caption,cite,code,dfn,em,strong,th,var, optgroup{font-style:inherit;font-weight:inherit;}
            del,ins{text-decoration:none;}
            li{list-style:none;}
            caption,th{text-align:left;}
            h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
            q:before,q:after{content:'';}
            abbr,acronym{border:0;font-variant:normal;}
            sup{vertical-align:baseline;}
            sub{vertical-align:baseline;}
            legend{color:#000;}
            input,button,textarea,select,optgroup,option{font-family:inherit; font-size:inherit;font-style:inherit;font-weight:inherit;}
            input,button,textarea,select{*font-size:100%;}
            .clear {clear:both;height:0px;overflow:hidden;}
            .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}
            .clearfix{*+height:1%;}
            /*body{-webkit-user-select:none;-webkit-text-size-adjust:none;-webkit-transform-style:preserve-3d;}*/
            *{-webkit-tap-highlight-color:rgba(0,0,0,0);}
            html,body {
                width: 100%;
                height: 100%;
            }
            body {
                float: left;
                margin: 0;
                background: url($!webPath/images/login-bg.png) no-repeat;
                -webkit-background-size: 100% 100%;
                background-size: 100% 100%;
            }
            .loginWrap {
                box-sizing: border-box;
                width: 384px;
                height: 442px;
                padding: 101px 51px 0;
                background: #f5f6f8;
            }
            .loginBox {
                width: 100%;
                height: 341px;
            }
            .loginWrap h1 {
                height: 30px;
                margin-bottom: 52px;
                line-height: 30px;
                text-align: center;
                font-size: 24px;
                color: #4b8cfa;
            }
            #LoginUser,
            #LoginPassWord {
                box-sizing: border-box;
                display: block;
                width: 282px;
                height: 51px;
                line-height: 51px;
                border: 1px solid #e3e3e3;
                padding-left: 10px;
            }
            #LoginPassWord {
                margin: -1px 0 31px;
            }
            .login-btn {
                display: block;
                width: 100%;
                height: 48px;
                margin-bottom: 28px;
                color: #fff;
                font-size: 18px;
                line-height: 48px;
                text-align: center;
                cursor: pointer;
                background: #4a90f8;
            }
            .remember-box {
                width: 100%;
                height: 16px;
            }
            .remember-box #rememberUP {
                display: block;
                float: left;
                width: 16px;
                height: 16px;
                margin-right: 7px;
                background: #fff;
                border: 1px solid #989898;
            }
            .remember-box strong {
                display: block;
                float: left;
                height: 16px;
                line-height: 16px;
                font-size: 14px;
                color: #989898;
            }
            .login-logo {
                position: relative;
                top: -508px;
                left: 0;
            }
        </style>
    </head>
<body class="clearfix">
<div class="loginWrap clearfix">
    <form action="">
        <div class="loginBox">
            <h1>脱贫攻坚信息管理系统</h1>
            <input type="text" id="LoginUser" name="LoginUser" placeholder="用户名">
            <input type="password" id="LoginPassWord" name="LoginPassWord" placeholder="密码">
            <strong class="login-btn">登录</strong>
            <div class="remember-box">
                <input type="checkbox" id="rememberUP">
                <strong>保持我的登录状态</strong>
            </div>
        </div>
        <img src="$!webPath/images/login-logo.png" alt="" class="login-logo">
    </form>
</div>
</body>
<script type="text/javascript" src="$!webPath/index/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
    $(function(){
        //获得屏幕高度
        function bch(){
            var height=$(window).height();
            var mar = (height - 442) / 2 ;
            $(".loginWrap").css("margin", mar + "px auto 0");
        }
        bch();//自动设置body的高度
        window.onresize=function(){//实时监控屏幕的高度，随时调整body的高
            bch();
        }
    });
    jQuery(function($) {
        $(".login-btn").on('click',function () {
            var userName = $("#LoginUser").val();
            var password = $("#LoginPassWord").val();
            $.ajax({
                url:"$!webPath/main/login",
                data:{'userName': userName,'password': password},
                dataType:"json",
                type:"post",
                success:function(data){
                    if(data.code==0){
                        window.location.href = "$!webPath/main/index";
                    }else {
                        alert('你输入的用户或者密码有误')
                    }

                }
            })
        })
    });
</script>
</html>